package createModel.singletonMode.staticInteriorSigleton;

/**
 * 2024/01/20
 * <p>
 * ZhangYi
 * Description 利用静态内部类实现单例模式,推荐使用
 */
public class StaticSingleton {

    private StaticSingleton(){

    }
    private static class StaticSingletonInstance{
        private static StaticSingleton INSTANCE = new StaticSingleton();
    }

    public static StaticSingleton getInstance(){
        return StaticSingletonInstance.INSTANCE;
    }
}


